package com.wcity.manage.common.exception;

import com.wcity.manage.common.enums.Code;

/**
 * Created by jn on 2016/11/3.
 * 非正常逻辑抛出
 */
public class CustomException extends RuntimeException {

    private static final long serialVersionUID = -615623933205550031L;

    private Code code;

    public CustomException(String message, Code code) {
        super(message);
        this.code = code;
    }

    public CustomException(String message, Throwable cause, Code code) {
        super(message, cause);
        this.code = code;
    }

    public Code getCode() {
        return code;
    }

    public void setCode(Code code) {
        this.code = code;
    }
}
